package com.sparrow.source.persistense.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sparrow.source.common.dto.DeviceUserListRes;
import com.sparrow.source.common.dto.DeviceVerifyLog;
import com.sparrow.source.persistense.UnvDevice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author bryceyung
 * @since 2024/11/19
 */
@Repository
public interface UnvDeviceMapper extends BaseMapper<UnvDevice> {

    Page<UnvDevice> selectWithParam(@Param("name") String name, @Param("channel") String channel, @Param("ip") String ip,
            @Param("serialNumber") String serialNum, Page<UnvDevice> page);

    List<DeviceVerifyLog> selectDetailInfoByUserId(@Param("deviceId") Integer deviceId, @Param("limit") Integer limit);

    List<DeviceUserListRes> selectDeivceUserList(@Param("deviceId") Integer deviceId);

    List<UnvDevice> selectOffLineDevices();

}
